unsafe class Eg_Pointer
{
    public int value = 100;
    public void PrintPointer(int val)
    {
        int* p = &val;
        Console.WriteLine("{0}", *p);
        //stackalloc();
        // Console.WriteLine();
    }
    public static bool MallocMem(string strs)
    {
        int length = strs.Count();
        // Console.Write($"length is {length}.");
        char* c = stackalloc char[length];
        for (int index = 0; index < length; index++)
        {
            c[index] = strs[index];
            // Console.Write(strs[index]);
        }
        for (int index = 0; index < length; index++)
        {
            Console.Write(c[index]);
        }
        Console.WriteLine();
        return true;
    }
}
